//
//  JMFormDescriptorDelegate.h
//  SYPerfectDemo
//
//  Created by Lssyyy on 2019/7/31.
//  Copyright © 2019年 Lssyyy. All rights reserved.
//
#import "JMFormDescriptor.h"
#import <Foundation/Foundation.h>

@class JMFormSectionDescriptor;

typedef NS_ENUM(NSUInteger, JMPredicateType) {
    JMPredicateTypeDisabled = 0,
    JMPredicateTypeHidden
};


@protocol JMFormDescriptorDelegate <NSObject>

@required

-(void)formSectionHasBeenRemoved:(JMFormSectionDescriptor *)formSection atIndex:(NSUInteger)index;
-(void)formSectionHasBeenAdded:(JMFormSectionDescriptor *)formSection atIndex:(NSUInteger)index;
-(void)formRowHasBeenAdded:(JMFormRowDescriptor *)formRow atIndexPath:(NSIndexPath *)indexPath;
-(void)formRowHasBeenRemoved:(JMFormRowDescriptor *)formRow atIndexPath:(NSIndexPath *)indexPath;
-(void)formRowDescriptorValueHasChanged:(JMFormRowDescriptor *)formRow oldValue:(id)oldValue newValue:(id)newValue;
-(void)formRowDescriptorPredicateHasChanged:(JMFormRowDescriptor *)formRow
                                   oldValue:(id)oldValue
                                   newValue:(id)newValue
                              predicateType:(JMPredicateType)predicateType;

@end
